package com.hx.miniblog.annotation;

import com.hx.miniblog.pojo.mj.RoleType;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author wenhao hu
 * @title: CheckLogin
 * @projectName miniBlog
 * @description: TODO
 * @date 2021/12/2817:55
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface CheckLogin {
    boolean required() default true;

    RoleType[] roles() default {RoleType.USER};
}

